#include "highpassfilterdialog.h"
#include "ui_highpassfilterdialog.h"

HighPassFilterDialog::HighPassFilterDialog(QWidget *parent, MainApp *_app) : QDialog(parent), ui(new Ui::HighPassFilterDialog)
{
    ui->setupUi(this);
    m_R = 0.0f;
    m_MainApp = _app;
    ui->label_3->setText(QString::number(0));
    ui->horizontalSlider->setMaximum(m_MainApp->GetImg()->GetImgWidth());
}

HighPassFilterDialog::~HighPassFilterDialog()
{
    delete ui;
}

void HighPassFilterDialog::on_horizontalSlider_valueChanged(int value)
{
    ui->label_3->setText(QString::number(value));
    m_R = value * 1.0f;
}

void HighPassFilterDialog::on_pushButton_clicked()
{
    m_MainApp->HighPassFilter(m_R);
}
